package com.ll.spring5;

/**
 * 2020/9/7 - 15:15
 */
public class Book {
    private String bname;
    private String bauthor;
    private String address;

    public Book() {
    }

    //有参构造注入
    public Book(String bname) {
        this.bname = bname;
    }

//    使用set方法进行注入属性
    public void setBauthor(String bauthor) {
        this.bauthor = bauthor;
    }

//    使用set方法进行注入属性
    public void setBname(String bname) {
        this.bname = bname;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public static void main(String[] args) {
        Book book = new Book("abc");
    }

    public void testDemo() {
        System.out.println(bname+ "::" + bauthor + "::" + address);
    }
}
